package vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.part;

import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;

import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.AdaptedauiPackage;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.PresentationSystem;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.PresentationTemporalRelationship;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.UITemporalRelationship;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.AbstractPresentationEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.AbstractPresentationNameEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.AbstractPresentationUIComponentCompartmentEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.AbstractUIComponent2EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.AbstractUIComponentEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.AbstractUIComponentName2EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.AbstractUIComponentNameEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.ActivatorEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.ActivatorNameEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.InputFieldEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.InputFieldNameEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.MultipleChoiceEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.MultipleChoiceNameEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.NavigatorEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.NavigatorNameEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.OutputFieldEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.OutputFieldNameEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationContainerRelationshipEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationSystemEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship10EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship11EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship2EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship3EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship4EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship5EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship6EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship7EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship8EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship9EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationshipEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationshipLabel10EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationshipLabel11EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationshipLabel2EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationshipLabel3EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationshipLabel4EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationshipLabel5EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationshipLabel6EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationshipLabel7EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationshipLabel8EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationshipLabel9EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationshipLabelEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationUnitEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationUnitNameEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationUnitUIComponentCompartmentEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.SingleChoiceEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.SingleChoiceNameEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UIContainerRelationshipEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship10EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship11EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship2EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship3EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship4EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship5EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship6EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship7EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship8EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship9EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationshipEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationshipLabel10EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationshipLabel11EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationshipLabel2EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationshipLabel3EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationshipLabel4EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationshipLabel5EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationshipLabel6EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationshipLabel7EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationshipLabel8EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationshipLabel9EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationshipLabelEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.expressions.AdaptedauiOCLFactory;

/**
 * This registry is used to determine which type of visual object should be
 * created for the corresponding Diagram, Node, ChildNode or Link represented
 * by a domain model object.
 * 
 * @generated
 */
public class AdaptedauiVisualIDRegistry {

	/**
	 * @generated
	 */
	private static final String DEBUG_KEY = "vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram/debug/visualID"; //$NON-NLS-1$

	/**
	 * @generated
	 */
	public static int getVisualID(View view) {
		if (view instanceof Diagram) {
			if (PresentationSystemEditPart.MODEL_ID.equals(view.getType())) {
				return PresentationSystemEditPart.VISUAL_ID;
			} else {
				return -1;
			}
		}
		return vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.part.AdaptedauiVisualIDRegistry
				.getVisualID(view.getType());
	}

	/**
	 * @generated
	 */
	public static String getModelID(View view) {
		View diagram = view.getDiagram();
		while (view != diagram) {
			EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
			if (annotation != null) {
				return (String) annotation.getDetails().get("modelID"); //$NON-NLS-1$
			}
			view = (View) view.eContainer();
		}
		return diagram != null ? diagram.getType() : null;
	}

	/**
	 * @generated
	 */
	public static int getVisualID(String type) {
		try {
			return Integer.parseInt(type);
		} catch (NumberFormatException e) {
			if (Boolean.TRUE.toString().equalsIgnoreCase(
					Platform.getDebugOption(DEBUG_KEY))) {
				AdaptedauiDiagramEditorPlugin.getInstance().logError(
						"Unable to parse view type as a visualID number: "
								+ type);
			}
		}
		return -1;
	}

	/**
	 * @generated
	 */
	public static String getType(int visualID) {
		return Integer.toString(visualID);
	}

	/**
	 * @generated
	 */
	public static int getDiagramVisualID(EObject domainElement) {
		if (domainElement == null) {
			return -1;
		}
		if (AdaptedauiPackage.eINSTANCE.getPresentationSystem().isSuperTypeOf(
				domainElement.eClass())
				&& isDiagram((PresentationSystem) domainElement)) {
			return PresentationSystemEditPart.VISUAL_ID;
		}
		return -1;
	}

	/**
	 * @generated
	 */
	public static int getNodeVisualID(View containerView, EObject domainElement) {
		if (domainElement == null) {
			return -1;
		}
		String containerModelID = vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.part.AdaptedauiVisualIDRegistry
				.getModelID(containerView);
		if (!PresentationSystemEditPart.MODEL_ID.equals(containerModelID)
				&& !"adaptedaui".equals(containerModelID) && !"Adaptedaui".equals(containerModelID)) { //$NON-NLS-1$ //$NON-NLS-2$
			return -1;
		}
		int containerVisualID;
		if (PresentationSystemEditPart.MODEL_ID.equals(containerModelID)) {
			containerVisualID = vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.part.AdaptedauiVisualIDRegistry
					.getVisualID(containerView);
		} else {
			if (containerView instanceof Diagram) {
				containerVisualID = PresentationSystemEditPart.VISUAL_ID;
			} else {
				return -1;
			}
		}
		switch (containerVisualID) {
		case PresentationSystemEditPart.VISUAL_ID:
			if (AdaptedauiPackage.eINSTANCE.getPresentationUnit()
					.isSuperTypeOf(domainElement.eClass())) {
				return PresentationUnitEditPart.VISUAL_ID;
			}
			if (AdaptedauiPackage.eINSTANCE.getAbstractPresentation()
					.isSuperTypeOf(domainElement.eClass())) {
				return AbstractPresentationEditPart.VISUAL_ID;
			}
			break;
		case PresentationUnitUIComponentCompartmentEditPart.VISUAL_ID:
			if (AdaptedauiPackage.eINSTANCE.getAbstractUIComponent()
					.isSuperTypeOf(domainElement.eClass())) {
				return AbstractUIComponentEditPart.VISUAL_ID;
			}
			if (AdaptedauiPackage.eINSTANCE.getMultipleChoice().isSuperTypeOf(
					domainElement.eClass())) {
				return MultipleChoiceEditPart.VISUAL_ID;
			}
			if (AdaptedauiPackage.eINSTANCE.getInputField().isSuperTypeOf(
					domainElement.eClass())) {
				return InputFieldEditPart.VISUAL_ID;
			}
			if (AdaptedauiPackage.eINSTANCE.getOutputField().isSuperTypeOf(
					domainElement.eClass())) {
				return OutputFieldEditPart.VISUAL_ID;
			}
			if (AdaptedauiPackage.eINSTANCE.getNavigator().isSuperTypeOf(
					domainElement.eClass())) {
				return NavigatorEditPart.VISUAL_ID;
			}
			if (AdaptedauiPackage.eINSTANCE.getSingleChoice().isSuperTypeOf(
					domainElement.eClass())) {
				return SingleChoiceEditPart.VISUAL_ID;
			}
			if (AdaptedauiPackage.eINSTANCE.getActivator().isSuperTypeOf(
					domainElement.eClass())) {
				return ActivatorEditPart.VISUAL_ID;
			}
			break;
		case AbstractPresentationUIComponentCompartmentEditPart.VISUAL_ID:
			if (AdaptedauiPackage.eINSTANCE.getAbstractUIComponent()
					.isSuperTypeOf(domainElement.eClass())) {
				return AbstractUIComponent2EditPart.VISUAL_ID;
			}
			break;
		}
		return -1;
	}

	/**
	 * @generated
	 */
	public static boolean canCreateNode(View containerView, int nodeVisualID) {
		String containerModelID = vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.part.AdaptedauiVisualIDRegistry
				.getModelID(containerView);
		if (!PresentationSystemEditPart.MODEL_ID.equals(containerModelID)
				&& !"adaptedaui".equals(containerModelID) && !"Adaptedaui".equals(containerModelID)) { //$NON-NLS-1$ //$NON-NLS-2$
			return false;
		}
		int containerVisualID;
		if (PresentationSystemEditPart.MODEL_ID.equals(containerModelID)) {
			containerVisualID = vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.part.AdaptedauiVisualIDRegistry
					.getVisualID(containerView);
		} else {
			if (containerView instanceof Diagram) {
				containerVisualID = PresentationSystemEditPart.VISUAL_ID;
			} else {
				return false;
			}
		}
		switch (containerVisualID) {
		case PresentationSystemEditPart.VISUAL_ID:
			if (PresentationUnitEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			if (AbstractPresentationEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case PresentationUnitEditPart.VISUAL_ID:
			if (PresentationUnitNameEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			if (PresentationUnitUIComponentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case AbstractPresentationEditPart.VISUAL_ID:
			if (AbstractPresentationNameEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			if (AbstractPresentationUIComponentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case AbstractUIComponentEditPart.VISUAL_ID:
			if (AbstractUIComponentNameEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case MultipleChoiceEditPart.VISUAL_ID:
			if (MultipleChoiceNameEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case InputFieldEditPart.VISUAL_ID:
			if (InputFieldNameEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case OutputFieldEditPart.VISUAL_ID:
			if (OutputFieldNameEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case NavigatorEditPart.VISUAL_ID:
			if (NavigatorNameEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case SingleChoiceEditPart.VISUAL_ID:
			if (SingleChoiceNameEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case ActivatorEditPart.VISUAL_ID:
			if (ActivatorNameEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case AbstractUIComponent2EditPart.VISUAL_ID:
			if (AbstractUIComponentName2EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case PresentationUnitUIComponentCompartmentEditPart.VISUAL_ID:
			if (AbstractUIComponentEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			if (MultipleChoiceEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			if (InputFieldEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			if (OutputFieldEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			if (NavigatorEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			if (SingleChoiceEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			if (ActivatorEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case AbstractPresentationUIComponentCompartmentEditPart.VISUAL_ID:
			if (AbstractUIComponent2EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case UITemporalRelationshipEditPart.VISUAL_ID:
			if (UITemporalRelationshipLabelEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case UITemporalRelationship2EditPart.VISUAL_ID:
			if (UITemporalRelationshipLabel2EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case UITemporalRelationship3EditPart.VISUAL_ID:
			if (UITemporalRelationshipLabel3EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case UITemporalRelationship4EditPart.VISUAL_ID:
			if (UITemporalRelationshipLabel4EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case UITemporalRelationship5EditPart.VISUAL_ID:
			if (UITemporalRelationshipLabel5EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case UITemporalRelationship6EditPart.VISUAL_ID:
			if (UITemporalRelationshipLabel6EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case UITemporalRelationship7EditPart.VISUAL_ID:
			if (UITemporalRelationshipLabel7EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case UITemporalRelationship8EditPart.VISUAL_ID:
			if (UITemporalRelationshipLabel8EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case UITemporalRelationship9EditPart.VISUAL_ID:
			if (UITemporalRelationshipLabel9EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case UITemporalRelationship10EditPart.VISUAL_ID:
			if (UITemporalRelationshipLabel10EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case UITemporalRelationship11EditPart.VISUAL_ID:
			if (UITemporalRelationshipLabel11EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case PresentationTemporalRelationshipEditPart.VISUAL_ID:
			if (PresentationTemporalRelationshipLabelEditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case PresentationTemporalRelationship2EditPart.VISUAL_ID:
			if (PresentationTemporalRelationshipLabel2EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case PresentationTemporalRelationship3EditPart.VISUAL_ID:
			if (PresentationTemporalRelationshipLabel3EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case PresentationTemporalRelationship4EditPart.VISUAL_ID:
			if (PresentationTemporalRelationshipLabel4EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case PresentationTemporalRelationship5EditPart.VISUAL_ID:
			if (PresentationTemporalRelationshipLabel5EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case PresentationTemporalRelationship6EditPart.VISUAL_ID:
			if (PresentationTemporalRelationshipLabel6EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case PresentationTemporalRelationship7EditPart.VISUAL_ID:
			if (PresentationTemporalRelationshipLabel7EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case PresentationTemporalRelationship8EditPart.VISUAL_ID:
			if (PresentationTemporalRelationshipLabel8EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case PresentationTemporalRelationship9EditPart.VISUAL_ID:
			if (PresentationTemporalRelationshipLabel9EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case PresentationTemporalRelationship10EditPart.VISUAL_ID:
			if (PresentationTemporalRelationshipLabel10EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		case PresentationTemporalRelationship11EditPart.VISUAL_ID:
			if (PresentationTemporalRelationshipLabel11EditPart.VISUAL_ID == nodeVisualID) {
				return true;
			}
			break;
		}
		return false;
	}

	/**
	 * @generated
	 */
	public static int getLinkWithClassVisualID(EObject domainElement) {
		if (domainElement == null) {
			return -1;
		}
		if (AdaptedauiPackage.eINSTANCE.getUITemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isUITemporalRelationship_4001((UITemporalRelationship) domainElement)) {
			return UITemporalRelationshipEditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getUITemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isUITemporalRelationship_4002((UITemporalRelationship) domainElement)) {
			return UITemporalRelationship2EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getUITemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isUITemporalRelationship_4003((UITemporalRelationship) domainElement)) {
			return UITemporalRelationship3EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getUITemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isUITemporalRelationship_4004((UITemporalRelationship) domainElement)) {
			return UITemporalRelationship4EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getUITemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isUITemporalRelationship_4005((UITemporalRelationship) domainElement)) {
			return UITemporalRelationship5EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getUITemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isUITemporalRelationship_4006((UITemporalRelationship) domainElement)) {
			return UITemporalRelationship6EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getUITemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isUITemporalRelationship_4007((UITemporalRelationship) domainElement)) {
			return UITemporalRelationship7EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getUITemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isUITemporalRelationship_4008((UITemporalRelationship) domainElement)) {
			return UITemporalRelationship8EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getUITemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isUITemporalRelationship_4009((UITemporalRelationship) domainElement)) {
			return UITemporalRelationship9EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getUITemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isUITemporalRelationship_4010((UITemporalRelationship) domainElement)) {
			return UITemporalRelationship10EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getUITemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isUITemporalRelationship_4011((UITemporalRelationship) domainElement)) {
			return UITemporalRelationship11EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getUIContainerRelationship()
				.isSuperTypeOf(domainElement.eClass())) {
			return UIContainerRelationshipEditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getPresentationContainerRelationship()
				.isSuperTypeOf(domainElement.eClass())) {
			return PresentationContainerRelationshipEditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getPresentationTemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isPresentationTemporalRelationship_4015((PresentationTemporalRelationship) domainElement)) {
			return PresentationTemporalRelationshipEditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getPresentationTemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isPresentationTemporalRelationship_4016((PresentationTemporalRelationship) domainElement)) {
			return PresentationTemporalRelationship2EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getPresentationTemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isPresentationTemporalRelationship_4017((PresentationTemporalRelationship) domainElement)) {
			return PresentationTemporalRelationship3EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getPresentationTemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isPresentationTemporalRelationship_4018((PresentationTemporalRelationship) domainElement)) {
			return PresentationTemporalRelationship4EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getPresentationTemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isPresentationTemporalRelationship_4019((PresentationTemporalRelationship) domainElement)) {
			return PresentationTemporalRelationship5EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getPresentationTemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isPresentationTemporalRelationship_4020((PresentationTemporalRelationship) domainElement)) {
			return PresentationTemporalRelationship6EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getPresentationTemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isPresentationTemporalRelationship_4021((PresentationTemporalRelationship) domainElement)) {
			return PresentationTemporalRelationship7EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getPresentationTemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isPresentationTemporalRelationship_4022((PresentationTemporalRelationship) domainElement)) {
			return PresentationTemporalRelationship8EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getPresentationTemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isPresentationTemporalRelationship_4023((PresentationTemporalRelationship) domainElement)) {
			return PresentationTemporalRelationship9EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getPresentationTemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isPresentationTemporalRelationship_4024((PresentationTemporalRelationship) domainElement)) {
			return PresentationTemporalRelationship10EditPart.VISUAL_ID;
		}
		if (AdaptedauiPackage.eINSTANCE.getPresentationTemporalRelationship()
				.isSuperTypeOf(domainElement.eClass())
				&& isPresentationTemporalRelationship_4025((PresentationTemporalRelationship) domainElement)) {
			return PresentationTemporalRelationship11EditPart.VISUAL_ID;
		}
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 * 
	 * @generated
	 */
	private static boolean isDiagram(PresentationSystem element) {
		return true;
	}

	/**
	 * @generated
	 */
	private static boolean isUITemporalRelationship_4001(
			UITemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(0,
				AdaptedauiPackage.eINSTANCE.getUITemporalRelationship(), null)
				.evaluate(domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isUITemporalRelationship_4002(
			UITemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(3,
				AdaptedauiPackage.eINSTANCE.getUITemporalRelationship(), null)
				.evaluate(domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isUITemporalRelationship_4003(
			UITemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(6,
				AdaptedauiPackage.eINSTANCE.getUITemporalRelationship(), null)
				.evaluate(domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isUITemporalRelationship_4004(
			UITemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(9,
				AdaptedauiPackage.eINSTANCE.getUITemporalRelationship(), null)
				.evaluate(domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isUITemporalRelationship_4005(
			UITemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(12,
				AdaptedauiPackage.eINSTANCE.getUITemporalRelationship(), null)
				.evaluate(domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isUITemporalRelationship_4006(
			UITemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(15,
				AdaptedauiPackage.eINSTANCE.getUITemporalRelationship(), null)
				.evaluate(domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isUITemporalRelationship_4007(
			UITemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(18,
				AdaptedauiPackage.eINSTANCE.getUITemporalRelationship(), null)
				.evaluate(domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isUITemporalRelationship_4008(
			UITemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(21,
				AdaptedauiPackage.eINSTANCE.getUITemporalRelationship(), null)
				.evaluate(domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isUITemporalRelationship_4009(
			UITemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(24,
				AdaptedauiPackage.eINSTANCE.getUITemporalRelationship(), null)
				.evaluate(domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isUITemporalRelationship_4010(
			UITemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(27,
				AdaptedauiPackage.eINSTANCE.getUITemporalRelationship(), null)
				.evaluate(domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isUITemporalRelationship_4011(
			UITemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(30,
				AdaptedauiPackage.eINSTANCE.getUITemporalRelationship(), null)
				.evaluate(domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isPresentationTemporalRelationship_4015(
			PresentationTemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(
				33,
				AdaptedauiPackage.eINSTANCE
						.getPresentationTemporalRelationship(), null).evaluate(
				domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isPresentationTemporalRelationship_4016(
			PresentationTemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(
				36,
				AdaptedauiPackage.eINSTANCE
						.getPresentationTemporalRelationship(), null).evaluate(
				domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isPresentationTemporalRelationship_4017(
			PresentationTemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(
				39,
				AdaptedauiPackage.eINSTANCE
						.getPresentationTemporalRelationship(), null).evaluate(
				domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isPresentationTemporalRelationship_4018(
			PresentationTemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(
				42,
				AdaptedauiPackage.eINSTANCE
						.getPresentationTemporalRelationship(), null).evaluate(
				domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isPresentationTemporalRelationship_4019(
			PresentationTemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(
				45,
				AdaptedauiPackage.eINSTANCE
						.getPresentationTemporalRelationship(), null).evaluate(
				domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isPresentationTemporalRelationship_4020(
			PresentationTemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(
				48,
				AdaptedauiPackage.eINSTANCE
						.getPresentationTemporalRelationship(), null).evaluate(
				domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isPresentationTemporalRelationship_4021(
			PresentationTemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(
				51,
				AdaptedauiPackage.eINSTANCE
						.getPresentationTemporalRelationship(), null).evaluate(
				domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isPresentationTemporalRelationship_4022(
			PresentationTemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(
				54,
				AdaptedauiPackage.eINSTANCE
						.getPresentationTemporalRelationship(), null).evaluate(
				domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isPresentationTemporalRelationship_4023(
			PresentationTemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(
				57,
				AdaptedauiPackage.eINSTANCE
						.getPresentationTemporalRelationship(), null).evaluate(
				domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isPresentationTemporalRelationship_4024(
			PresentationTemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(
				60,
				AdaptedauiPackage.eINSTANCE
						.getPresentationTemporalRelationship(), null).evaluate(
				domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

	/**
	 * @generated
	 */
	private static boolean isPresentationTemporalRelationship_4025(
			PresentationTemporalRelationship domainElement) {
		Object result = AdaptedauiOCLFactory.getExpression(
				63,
				AdaptedauiPackage.eINSTANCE
						.getPresentationTemporalRelationship(), null).evaluate(
				domainElement);
		return result instanceof Boolean && ((Boolean) result).booleanValue();
	}

}
